import request from '@/utils/request'

// 查询代理路由列表
export function listRoute(query) {
  return request({
    url: '/proxy/route/list',
    method: 'get',
    params: query
  })
}
// 查询代理服务列表
export function listService(query) {
  return request({
    url: '/proxy/service/all',
    method: 'get',
    params: query
  })
}

// 查询代理路由详细
export function getRoute(id) {
  return request({
    url: '/proxy/route/' + id,
    method: 'get'
  })
}

// 新增代理路由
export function addRoute(data) {
  return request({
    url: '/proxy/route',
    method: 'post',
    data: data
  })
}

// 修改代理路由
export function updateRoute(data) {
  return request({
    url: '/proxy/route',
    method: 'put',
    data: data
  })
}

// 删除代理路由
export function delRoute(id) {
  return request({
    url: '/proxy/route/' + id,
    method: 'delete'
  })
}
